#
# import configparser
# import os
#
# from src.spark_edu_rag.utils import get_project_root
#
# class Config:
#
#     def __init__(self, config_file):
#         self.config = configparser.ConfigParser()
#         self.config.read(config_file)
#         # MySQL 配置
#         self.MYSQL_HOST = self.config.get("mysql", "host")
#         self.MYSQL_PORT = self.config.getint("mysql", "port")
#         self.MYSQL_USER = self.config.get("mysql", "user")
#         self.MYSQL_PASSWORD = self.config.get("mysql", "password")
#         self.MYSQL_DATABASE = self.config.get("mysql", "database")
#
#         # REDIS
#         self.REDIS_HOST = self.config.get("redis", "host")
#         self.REDIS_PORT = self.config.getint("redis", "port")
#         self.REDIS_PASSWORD = self.config.get("redis", "password")
#         self.REDIS_DATABASE = self.config.getint("redis", "database")
#
#         # 日志配置
#         self.LOG_LEVEL = self.config.get("log", "log_level")
#         self.LOG_DIR = self.config.get("log", "log_dir")
#         self.MAX_BYTES = self.config.getint("log", "max_bytes")
#         self.BACKUP_COUNT = self.config.getint("log", "backup_count")
#         self.ROTATE_WHEN = self.config.get("log", "rotate_when")
#         self.ROTATE_INTERVAL = self.config.getint("log", "rotate_interval")
#
#
#
# if __name__ == '__main__':
#     config_path = os.path.join(get_project_root(), "config.ini")
#     print("config_path:", config_path)
#     # config = Config(config_path)
